package com.microservice.base.mapper.hikcommon;

import com.microservice.base.entity.InfoTeacher;
import com.microservice.base.entity.SysTreeview;
import com.microservice.base.mapper.BaseMP;
import com.microservice.base.vo.searchVo.InfoTeacherSearchVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface InfoTeacherMP extends BaseMP<InfoTeacher> {
    List<InfoTeacher> queryAll(InfoTeacherSearchVo infoTeacherSearchVo);

    int selectBeforeSave(Map<String, Object> map);

    List<Map<String, Object>> getSearchCommon(@Param("schoolCode") String schoolCode, @Param("category") String category);

    void updateBatch(List<InfoTeacher> needToUpdateTeacher);

    /**
     * 教师统计
     *
     * @param schoolCode
     * @return
     */
    Map<String, Object> statistics(@Param("schoolCode") String schoolCode, @Param("searchType") String searchType, @Param("other") String other);

    /**
     * 查找shortcode is null 的老师
     *
     * @return
     */
    List<InfoTeacher> queryShortcodeIsNull();

    /**
     * 根据teacherCode查询教师详情
     *
     * @param schoolCode
     * @param teacherCode
     * @return
     */
    InfoTeacher getByTeacherCode(@Param("schoolCode") String schoolCode, @Param("teacherCode") String teacherCode);

    List<InfoTeacher> getTeacherBySchoolCode(String schoolCode);

    List<InfoTeacher> queryTeacherByLoginName(@Param("loginName") String loginName, @Param("schoolCode") String schoolCode);

    @Override
    void save(InfoTeacher infoTeacher);

    @Override
    int update(InfoTeacher infoTeacher);

    @Override
    void delete(String id);

    void saveTeacher(InfoTeacher infoTeacher);

    void updateSync(String syncFlag);

    List<InfoTeacher> QueryUserTreeBySyncFlag(String syncFlag);

    void replace(List<InfoTeacher> teacher);

    /**
   * 由于已经保证一位老师一个部门,所以只返回一条记录
   * @param infoTeacher
   * @return
   */
}
